<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() 
	                   + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ssm-start</title>
</head>
<body>
这里是前端首页

<c:if test="${USER_SESSION.user_name!=null }">
欢迎${USER_SESSION.user_name}
</c:if>
<c:choose>
    <c:when test="${USER_SESSION.user_name!=null}">
        	<a href="${pageContext.request.contextPath }/me/index.action">个人中心</a>
    </c:when>
        
    <c:otherwise><a href="${pageContext.request.contextPath }/login.action">登录</a>
</c:otherwise>
    </c:choose>
 <table>
 	<tr><th>ID</th><th>名称</th><th>描述</th></tr>
 	<c:forEach items="${catlist}" var="one">
 	<tr>
 		<td>${one.cid }</td>
 		<td>${one.cname }</td>
 		<td>${one.cdesc }</td>
 	</tr>
   </c:forEach>
 </table>
</body>
</html>